package com.zbkj.crmeb.task.order;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import com.xxl.job.core.handler.annotation.XxlJob;
import com.zbkj.crmeb.store.service.OrderTaskService;

@Component
@Configuration //读取配置
public class OrderCompleteByUser {
    //日志
    private static final Logger logger = LoggerFactory.getLogger(OrderCompleteByUser.class);

    @Autowired
    private OrderTaskService orderTaskService;

    // 1分钟同步一次数据
    @XxlJob("orderCompleteByUser")
    public void init(){
        try {
            orderTaskService.complete();
        }catch (Exception e){
            e.printStackTrace();
            logger.error("OrderCompleteByUser.task" + " | msg : " + e.getMessage());
        }

    }
}
